package com.chinacoal.hr.levelimpl.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author: YunTao.Li
 * @create: 2019-11-19 01:57
 * @description:
 **/
@Data
@TableName(value = "xip_hr_biz_travel")
public class BizTravel {
    //出差申请单id
    @TableId(type = IdType.UUID)
    public String bizTravelId;
    //单据编码
    @TableField(fill = FieldFill.INSERT)
    public String bizTravelCode;
    //单据模板编码
    public String xlsCode;
    //申请单类型id
    public String docTypeId;
    //组织id
    public String ouId;
    public String orgCode;
    public String orgName;
    //申请部门id
    public String deptId;
    public String deptCode;
    public String deptName;
    //岗位id
    public String postId;
    //员工id
    public String empId;
    public String empCode;
    public String empName;
    //出差路线
    public String trace;
    //交通工具
    public String traffic;
    //返回交通工具
    public String backTraffic;

    //预计起始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date startDate;

    //预计终止时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date endDate;
    //出差待办事由
    public String travelDesc;
    //实际起始时间
    public Date actualStartDate;
    //实际终止时间
    public Date actualEndDate;
    //变更事由
    public String changeDesc;
    //申请人是否一起出差：y是，n否
    public String isJoinTravel;
    //流程实例编码
    public String insCode;
    //审批状态
    public String businessStatus;
    //创建日期
    public Date creationDate;
    //出差申请人用户id
    public String createdBy;
    //最后更新日期
    public Date lastUpdateDate;
    //最后更新人
    public String lastUpdatedBy;
    //出差申请人用户名
    public String createdByName;
    //预计起始时间段
    public String startTimeType;
    //预计终止时间段
    public String endTimeType;
    //实际起始时间段
    public String actualStartTimeType;
    //实际终止时间段
    public String actualEndTimeType;
    //实际交通工具
    public String actualTraffic;
    //实际返回交通工具
    public String actualBackTraffic;
    //出差天数
    public double days;

    @TableField(exist = false)
    public List<BizTravelEmp> bizTravelEmpList;

    // 对应要修改的文件业务id，在保存时候需要把此id换成本业务的主键id
    @TableField(exist = false)
    public String fileParamPaDocId;

    // workitemid
    @TableField(exist = false)
    public String taskId;

    @TableField(exist = false)
    public String nextUser;

    @TableField(exist = false)
    public String instanceCurrentState;
}
